<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let price = prompt('请输入单价')
    let num = prompt('请输入数量')
    let count = price * num
    document.write(`小计为：${count}元`)
  </script>
</body>
</html>